package com.zftlive.android.library.common.adapter;

import android.app.Activity;

import com.zftlive.android.library.base.adapter.AbsViewTemplet;
import com.zftlive.android.library.base.adapter.BaseMultiTypeAdapter;

import java.util.Map;

/**
 * 一般普通listview需要的视图模板
 *
 * @author 曾繁添
 * @version 1.0
 *
 */
public abstract class BasicDataAdapter extends BaseMultiTypeAdapter {

    public BasicDataAdapter(Activity mContext) {
        super(mContext);
    }

    @Override
    public void registeViewTemplet(Map<Integer, Class<? extends AbsViewTemplet>> mViewTemplet) {
        mViewTemplet.put(0, bindViewTemplet());
    }

    @Override
    public int adjustItemViewType(Object model, int position) {
        return 0;
    }

    /**
     * 绑定视图模板
     */
    public abstract Class<? extends AbsViewTemplet> bindViewTemplet();
}
